package map
{
	import com.game.res.UIRescource;
	import com.interfaces.general.AbstractDisplayObject;
	import com.interfaces.general.mangaer.ITick;
	
	import flash.display.Bitmap;
	import flash.display.BitmapData;
	import flash.geom.Point;
	import flash.geom.Rectangle;
	
	public class Char extends AbstractDisplayObject
	{
		private var bitt:Bitmap = new (UIRescource.CHAR_TU2) as Bitmap;
		private var bit:Bitmap = new Bitmap;
		private var _rect:Rectangle;
		private var index:int= 0;
		public function Char()
		{
			super();
			setGap(1000/4);
			bit.bitmapData = new BitmapData(29,70);
			addChild(bit);
		}
		
		override public function reDraw():void{
			trace("ddddddddd");
			_rect = new Rectangle(0,0,29,70);
			if(index >3 ){
				index = 0;
			}
			index ++;
			var point:Point = new Point(index*_rect.width,0);
			bit.bitmapData.copyPixels(bitt.bitmapData,_rect,point);
		}
			
	}
}